'use strict';

const path = require('path');

module.exports = {
  dev: {
    // 资源文件夹
    assetsSubDirectory: 'static',
    // 资源公共路径
    assetsPublicPath: '/dev',
    // ip
    host: 'localhost',
    // 端口
    // port: 3130,
    port: 9001,
    // 是否自动打开默认浏览器
    autoOpenBrowser: false,
    // 在浏览器中显示错误信息
    errorOverlay: true,
    // 通知错误
    notifyOnErrors: false,
    poll: false,
    useEslint: true,
    showEslintErrorsInOverlay: true,
    // 调试更方便
    devtool: 'cheap-module-eval-source-map',
    cacheBusting: true,
    // cssSourceMap 调试更方便
    cssSourceMap: true
  },

  build: {
    index: path.resolve(__dirname, '../dist/index.html'),
    // login: path.resolve(__dirname, '../dist/login.html'),
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    productionSourceMap: true,
    devtool: '#source-map',
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  }
};
